/*
 * acm2850.c
 *
 *  Created on: 6 Apr 2010
 *      Author: xuxu
 */

#include<stdio.h>
int main()
{
	int num[11][11];
	int n,m;
	int i,j;
	int bo;
	while(scanf("%d%d",&n,&m)&&n&&m)
	{
		bo=0;
		for(i=0;i<n;i++)
			for(j=0;j<m;j++)
			{
				scanf("%d",&num[i][j]);
				if(!num[i][j])
					bo=1;
			}
		if(0==bo)
		{
			printf("No\n");
			continue;
		}
		for(i=0;i<n;i++)
		{
			for(j=0;j<m;j++)
			{
				if(0==num[i][j])
				{
					if((j+1<m&&0==num[i][j+1])||(i+1<n&&0==num[i+1][j]))
					{
						bo=0;
						break;
					}
				}
			}
			if(0==bo)
				break;
		}
		if(bo)
			printf("Yes\n");
		else
			printf("No\n");

	}
	return 0;
}
